#define THREAD_SAFE